﻿// 配置启动类类型，第一个参数是 TestProgram 类完整限定名，第二个参数是当前项目程序集名称
using WeChatV3Pay.Core.Options;

[assembly: TestFramework("WeChatV3Pay.UnitTest.TestProgram", "WeChatV3Pay.UnitTest")]

namespace WeChatV3Pay.UnitTest
{
    /// <summary>
    /// 单元测试启动类
    /// </summary>
    public class TestProgram : TestStartup
    {
        public TestProgram(IMessageSink messageSink) : base(messageSink)
        {
            // 初始化 Furion
            Serve.Run(silence: true);
        }
    }


    public class Startup : AppStartup
    {
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddGrpcClient<WeChatPay.WeChatPayClient>(o =>
            {
                o.Address = new Uri("http://localhost:15001");
            });
            services.AddConfigurableOptions<AppInfosOptions>();
        }

        public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
        {
        }
    }
}